/*
 * @Author: your name
 * @Date: 2021-09-18 09:48:27
 * @LastEditTime: 2022-10-19 10:15:29
 * @LastEditors: zshawk1982
 * @Description: In User Settings Edit
 * @FilePath: \media_web_client\src\router\index.js
 */
import { createRouter, createWebHashHistory } from "vue-router";
import Home from "../views/Home.vue";

const routes = [
  {
    path: "/",
    redirect: "/dashboard",
  },
  {
    path: "/",
    name: "Home",
    component: Home,
    children: [
      {
        path: "/dashboard",
        name: "dashboard",
        meta: {
          title: "系统首页",
        },
        component: () =>
          import(
            /* webpackChunkName: "dashboard" */ "../views/dashboard/Dashboard.vue"
          ),
      },
      {
        path: "/userInfo",
        name: "userInfo",
        meta: {
          title: "用户信息",
        },
        component: () =>
          import(
             /* webpackChunkName: "table" */ "../views/user/UserInfo.vue"
          ),
      },
      {
        path: "/userAdd",
        name: "userAdd",
        meta: {
          title: "用户添加",
        },
        component: () =>
          import(
             /* webpackChunkName: "table" */ "../views/user/UserAdd.vue"
          ),
      },
      {
        path: "/articleInfo",
        name: "articleInfo",
        meta: {
          title: "文章信息",
        },
        component: () =>
          import(
            /* webpackChunkName: "table" */ "../views/article/ArticleInfo.vue"
          ),
      },
      {
        path: "/orderInfo",
        name: "orderInfo",
        meta: {
          title: "订单信息",
        },
        component: () =>
          import(
            /* webpackChunkName: "table" */ "../views/order/OrderInfo.vue"
          ),
      },
      {
        path: "/orderAdd",
        name: "orderAdd",
        meta: {
          title: "订单添加",
        },
        component: () =>
          import(
            /* webpackChunkName: "table" */ "../views/order/OrderAdd.vue"
          ),
      },
      {
        path: "/ticketAdd",
        name: "ticketAdd",
        meta: {
          title: "门票添加",
        },
        component: () =>
          import(
             /* webpackChunkName: "table" */ "../views/ticket/TicketAdd.vue"
          ),
      },
      {
        path: "/ticketInfo",
        name: "ticketInfo",
        meta: {
          title: "门票信息",
        },
        component: () =>
          import(
             /* webpackChunkName: "table" */ "../views/ticket/TicketInfo.vue"
          ),
      }, 
    ],
  },
  {
    path: "/login",
    name: "Login",
    meta: {
      title: "登录",
    },
    component: () =>
      import(/* webpackChunkName: "login" */ "../views/login/Login.vue"),
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
